package com.jiaoyou.baojian.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jiaoyou.baojian.R;
import com.jiaoyou.baojian.entity.RoomEntity;
import com.jiaoyou.baojian.entity.response.RoomItemResponse;
import com.jiaoyou.baojian.entity.response.RoomListResponse;
import com.jiaoyou.baojian.utils.Utils;

/**
 * Created by DemonZYM on 17/4/13.
 */

public class RoomAdapter extends BaseQuickAdapter<RoomItemResponse, BaseViewHolder> {
    public RoomAdapter() {
        super(R.layout.item_room);
    }

    @Override
    protected void convert(BaseViewHolder helper, RoomItemResponse item) {
        helper.setText(R.id.title, item.room.name)
                .setText(R.id.desc, item.room.description);
        Utils.showImage(mContext, item.room.img, (ImageView) helper.getView(R.id.image));
    }
}
